home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / gnu / gas / gassrc02.zoo / Makefile.unx < prev    next >
Makefile  |  1991-01-24  |  12KB  |  357 lines

  1. # Makefile for GAS.
  2. # Copyright (C) 1989, Free Software Foundation
  3. # This file is part of GAS, the GNU Assembler.
  4. # GAS is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 1, or (at your option)
  7. # any later version.
  8. # GAS is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11. # GNU General Public License for more details.
  12. # You should have received a copy of the GNU General Public License
  13. # along with GAS; see the file COPYING.  If not, write to
  14. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  15.  
  16. # This makefile may be used to make the VAX, 68020, 80386, 
  17. # SPARC, ns32k, or i860 assembler(s).
  18.  
  19. BINDIR = /usr/local/bin
  20. #CC=gcc
  21.  
  22. # If you are on a BSD system, un-comment the next two lines, and comment out
  23. # the lines for SystemV and HPUX below
  24. G0 = -g  -I. #-O -Wall
  25. LDFLAGS = $(CFLAGS)
  26. #
  27. # To compile gas on a System Five machine, comment out the two lines above
  28. # and un-comment out the next three lines
  29. # Comment out the -lPW on the LOADLIBES line if you are using GCC.
  30. # G0 = -g -I. -DUSG
  31. # LDFLAGS = $(CFLAGS)
  32. # LOADLIBES = -lmalloc -lPW
  33. #
  34. # To compile gas for HPUX, link m-hpux.h to m68k.h , and un-comment the
  35. # next two lines.  (If you are using GCC, comment out the alloca.o part)
  36. # (Get alloca from the emacs distribution, or use GCC.)
  37. # HPUX 7.0 may have a bug in setvbuf.  gas gives an error message like
  38. # 1:"Unknown operator" -- Statement 'NO_APP' ignored
  39. # if setvbuf is broken.  Re-compile input-file.c (and only input-file.c
  40. # with -DVMS and the problem should go away.
  41. #
  42. # G0 = -g -I. -DUSG
  43. # LOADLIBES = alloca.o
  44. #
  45. # To compile gas for a Sequent Symmetry, comment out all the above lines,
  46. # and un-comment the next two lines.
  47. # G0 = -g -I. -DUSE_SYSTEM_HDR -DEXEC_VERSION=1
  48. # LOADLIBES = -lc /usr/att/lib/libc.a
  49.  
  50. # If you just want to compile the vax assembler, type 'make avax'
  51.  
  52. # If you just want to compile the i386 assembler, type 'make a386'
  53.  
  54. # If you just want to compile the ns32k assembler, type 'make a32k'
  55.  
  56. # If you just want to compile the sparc assembler, type 'make asparc'
  57.  
  58. # If you just want to compile the mc68020 assembler, make sure m68k.h
  59. # is correctly set up, and type type 'make a68'  (Except on HPUX machines,
  60. # where you will have to make the changes marked below before typing
  61. # 'make a68'
  62. # m68k.h should be a symbolic or hard-link to one of
  63. # m-sun3.h , m-hpux.h or m-generic.h
  64. # depending on which machine you want to compile the 68020 assembler for.
  65. #
  66. # If you want the 68k assembler to be completely compatable with the the
  67. # SUN one, un-comment the -DSUN_ASM_SYNTAX line below.
  68. #
  69. # If you machine does not have vfprintf, but does have _doprnt(),
  70. # remove the # from the -DNO_VARARGS line below.
  71. #
  72. # If the return-type of a signal-hander is void (instead of int),
  73. # remove the # from the -DSIGTY line below.
  74. #
  75. # To include the mc68851 mmu coprocessor instructions in the 68020 assembler,
  76. # remove the # from the -Dm68851 line below.
  77. #
  78. # If you want the 68020 assembler use a register prefix character, un-comment
  79. # the REGISTER_PREFIX line, and (maybe) change the '%' to the appropriate
  80. # character.
  81. #
  82. # If you want the assembler to treat .L* or ..* symbols as local, instead of
  83. # the usual L* symbols, un-comment the DOT_LABEL_PREFIX line.
  84. #
  85. # If you want the 80386 assembler to correctly handle fsub/fsubr and fdiv/fdivr
  86. # opcodes (unlike most 80386 assemblers), remove the # from
  87. # the -DNON_BROKEN_WORDS line below.
  88. #
  89. # To compile 80386 Gas for the Sequent Symmetry, un-comment the -DEXEC_VERSION
  90. # and the -DUSE_SYSTEM_HDR lines below.
  91. #
  92. # To compile gas for the HP 9000/300 un-comment the -DUSE_HP_HDR line below.
  93. #
  94. # For the ns32k, the options are 32532 or 32032 CPU and 32381 or 32081 FPU.
  95. # To select the NS32532, remove the # from the -DNS32532 line below.
  96. # To compile in tne NS32381 opcodes in addition to the NS32081 opcodes
  97. # (the 32381 is a superset of the 32081), remove the # from the -DNS32381
  98. # line below.
  99. #
  100. # For the ns32k on a Sequent, uncomment the SEQUENT_COMPATABILITY line below.
  101. #
  102. # If you want the .align N directive to align to the next N byte boundry,
  103. # instead of the next 1<<N boundry, un-comment the OTHER_ALIGN line below.
  104. # (This option is automatically enabled when building the sparc assembler.
  105. #
  106.  
  107. O1 =  -DNO_VARARGS
  108. O2 = # -DNON_BROKEN_WORDS
  109. O3 = # -Dm68851
  110. O4 = # -DEXEC_VERSION=1
  111. O5 = # -DSIGTY=void
  112. O6 = # -DNS32532
  113. O6 = # -DNS32381
  114. O7 = # -DDOT_LABEL_PREFIX
  115. O8 = # -DSEQUENT_COMPATABILITY
  116. O9 = # -DREGISTER_PREFIX=\'%\'
  117. O10= # -DOTHER_ALIGN
  118.  
  119. G1 = # -DUSE_SYSTEM_HDR
  120. G2 = # -DUSE_HP_HDR
  121. G3 = # -DSUN_ASM_SYNTAX
  122.  
  123. OPTIONS = $(O1) $(O2) $(O3) $(O4) $(O5) $(O6) $(O7) $(O8) $(O9) $(O10)
  124.  
  125. CFLAGS = $(G0) $(G1) $(G2) $(G3) $(G4)
  126.  
  127. #
  128. # To make the 68020 assembler compile as the default, un-comment the next
  129. # line, and comment out all the other lines that start with DEFAULT_GAS
  130. DEFAULT_GAS=a68
  131. #
  132. # To make the VAX assembler compile as the default, un-comment the next
  133. # line and commment out all the other lines that start with DEFAULT_GAS
  134. #DEFAULT_GAS=avax
  135. #
  136. # To make the 80386 assembler compile as the default, un-comment the next
  137. # line and commment out all the other lines that start with DEFAULT_GAS
  138. #DEFAULT_GAS=a386
  139. #
  140. # To make the ns32k assembler compile as the default, un-comment the next
  141. # line and commment out all the other lines that start with DEFAULT_GAS
  142. #DEFAULT_GAS=a32k
  143. #
  144. # To make the sparc assembler compile as the default, un-comment the next
  145. # line and commment out all the other lines that start with DEFAULT_GAS
  146. #DEFAULT_GAS=asparc
  147. #
  148. # To make the i860 assembler compile as the default, un-comment the next
  149. # line and comment out all the other lines that start with DEFAULT_GAS
  150. #DEFAULT_GAS=a860
  151.  
  152. # Global Sources -------------------------------------------------------------
  153.  
  154. a =\
  155. as.o        xrealloc.o    xmalloc.o    hash.o        hex-value.o   \
  156. atof-generic.o    append.o    messages.o    expr.o        app.o         \
  157. frags.o        input-file.o    input-scrub.o    output-file.o                  \
  158. subsegs.o    symbols.o                    version.o     \
  159. flonum-const.o    flonum-copy.o    flonum-mult.o    strstr.o    bignum-copy.o \
  160. obstack.o
  161. #gdb.o        gdb-file.o    gdb-symbols.o    gdb-blocks.o    gdb-lines.o
  162.  
  163. a:    $(DEFAULT_GAS)
  164.     @rm -f a
  165.     @ln $(DEFAULT_GAS) a
  166.  
  167. # I860 GAS ------------------------------------------------------------------
  168. u = i860.o  atof-ieee.o  write-i860.o  read-i860.o
  169.  
  170. U = i860.c  i860.h i860-opcode.h
  171.  
  172. i860.o:    i860.c i860.h i860-opcode.h as.h frags.h struc-symbol.h
  173. i860.o:    flonum.h expr.h hash.h md.h write.h read.h symbols.h
  174.     $(CC) -c $(CFLAGS) -DI860 i860.c
  175.  
  176. atof-ieee.o:    flonum.h
  177.  
  178. write-i860.o:    write.c i860.h
  179.     $(CC) -c -DI860 $(CFLAGS) write.c
  180.     mv write.o write-i860.o
  181.  
  182. read-i860.o: read.c i860.h
  183.     $(CC) -c -DI860 $(CFLAGS) read.c
  184.     mv read.o read-i860.o
  185.  
  186. a860: $a $u
  187.     $(CC) -o a860 $(LDFLAGS) $a $u $(LOADLIBES)
  188.  
  189. # SPARC GAS ------------------------------------------------------------------
  190. v = sparc.o  atof-ieee.o  write-sparc.o  read-sparc.o
  191.  
  192. V = sparc.c  sparc.h  sparc-opcode.h
  193.  
  194. atof-ieee.o:    flonum.h
  195. sparc.o:    sparc.c sparc.h sparc-opcode.h as.h frags.h struc-symbol.h
  196. sparc.o:    flonum.h expr.h hash.h md.h write.h read.h symbols.h
  197.     $(CC) -c $(CFLAGS) -DSPARC sparc.c
  198.  
  199. write-sparc.o:    write.c
  200.     $(CC) -c -DSPARC $(CFLAGS) write.c
  201.     mv write.o write-sparc.o
  202.  
  203. read-sparc.o: read.c
  204.     $(CC) -c -DSPARC $(CFLAGS) read.c
  205.     mv read.o read-sparc.o
  206.  
  207. asparc: $a $v
  208.     $(CC) -o asparc $(LDFLAGS) $a $v $(LOADLIBES)
  209.  
  210. # NS32K GAS ------------------------------------------------------------------
  211. w = ns32k.o  atof-ieee.o  write-ns32k.o  read-ns32k.o
  212.  
  213. W = ns32k.c ns32k-opcode.h
  214.  
  215. atof-ieee.o:    flonum.h
  216. ns32k.o:    as.h frags.h struc-symbol.h flonum.h expr.h md.h hash.h
  217. ns32k.o:    write.h symbols.h ns32k-opcode.h ns32k.c
  218.     $(CC) $(CFLAGS) $(OPTIONS) -c ns32k.c
  219.  
  220. write-ns32k.o:    write.c
  221.     $(CC) -c -DNS32K $(CFLAGS) write.c
  222.     mv write.o write-ns32k.o
  223.  
  224. read-ns32k.o:
  225.     $(CC) -c -DNS32K $(CFLAGS) read.c
  226.     mv read.o read-ns32k.o
  227.  
  228. a32k: $a $w
  229.     $(CC) -o a32k $(LDFLAGS) $a $w $(LOADLIBES)
  230.  
  231. # 80386 GAS ------------------------------------------------------------------
  232. x =